package com.ruoyi.system.service.install.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.install.DevSoftware;
import com.ruoyi.system.mapper.install.DevSoftwareMapper;
import com.ruoyi.system.service.install.IDevSoftwareService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 软件信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-27
 */
@Service
public class DevSoftwareServiceImpl implements IDevSoftwareService
{
    @Autowired
    private DevSoftwareMapper devSoftwareMapper;

    /**
     * 查询软件信息
     * 
     * @param id 软件信息主键
     * @return 软件信息
     */
    @Override
    public DevSoftware selectDevSoftwareById(Long id)
    {
        return devSoftwareMapper.selectDevSoftwareById(id);
    }

    /**
     * 查询软件信息列表
     * 
     * @param devSoftware 软件信息
     * @return 软件信息
     */
    @Override
    public List<DevSoftware> selectDevSoftwareList(DevSoftware devSoftware)
    {
        return devSoftwareMapper.selectDevSoftwareList(devSoftware);
    }

    /**
     * 新增软件信息
     * 
     * @param devSoftware 软件信息
     * @return 结果
     */
    @Override
    public int insertDevSoftware(DevSoftware devSoftware)
    {
        devSoftware.setCreateTime(DateUtils.getNowDate());
        return devSoftwareMapper.insertDevSoftware(devSoftware);
    }

    /**
     * 修改软件信息
     * 
     * @param devSoftware 软件信息
     * @return 结果
     */
    @Override
    public int updateDevSoftware(DevSoftware devSoftware)
    {
        devSoftware.setUpdateTime(DateUtils.getNowDate());
        return devSoftwareMapper.updateDevSoftware(devSoftware);
    }

    /**
     * 批量删除软件信息
     * 
     * @param ids 需要删除的软件信息主键
     * @return 结果
     */
    @Override
    public int deleteDevSoftwareByIds(Long[] ids)
    {
        return devSoftwareMapper.deleteDevSoftwareByIds(ids);
    }

    /**
     * 删除软件信息信息
     * 
     * @param id 软件信息主键
     * @return 结果
     */
    @Override
    public int deleteDevSoftwareById(Long id)
    {
        return devSoftwareMapper.deleteDevSoftwareById(id);
    }
}
